﻿<UserControl x:Class="CartoonViewer.UC_Cartoon"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    >
    <Canvas >
        <Border BorderBrush="Black" BorderThickness="2" CornerRadius="5" x:Name="Cvs_Comic" Background="Transparent" Opacity="0.8"  >
            
            <Canvas Width="100" Height="150"   MouseEnter="Cvs_Comic_MouseEnter" MouseLeave="Cvs_Comic_MouseLeave" MouseLeftButtonUp="Cvs_Comic_MouseLeftButtonUp">
                <Grid Background="Transparent" > 
                   
                    <Border x:Name="FrontBorder" Visibility="Visible" >
                        <Border x:Name="FrontHost" Background="Transparent" Height="125">
                            <Image  x:Name="Img_CartoonFront"  Source="./images/top_huoying.jpg" Stretch="Fill" Width="100" Height="125"></Image>
                        </Border>
                    </Border>

                    <Border x:Name="BackBorder" Visibility="Visible"   >
                        <Border x:Name="BackHost" Background="Transparent" Height="125">
                            <Image  x:Name="Img_CartoonBack"  Source="./images/top_huoying.jpg" Stretch="Fill" Width="100" Height="125"></Image>
                        </Border>
                    </Border>
                    
                    <Viewport3D x:Name="Viewport3D00" Visibility="Hidden"  >
                        <Viewport3D.Camera>
                            <PerspectiveCamera x:Name="camera" Position="0,0,0.5" LookDirection="0,0,-3" FieldOfView="90" />
                        </Viewport3D.Camera>
                        <Viewport3D.Children>
                            <ModelVisual3D>
                                <ModelVisual3D.Content>
                                    <Model3DGroup>
                                        <DirectionalLight Color="#444" Direction="0,0,-1" />
                                        <AmbientLight Color="#BBB" />
                                    </Model3DGroup>
                                </ModelVisual3D.Content>
                            </ModelVisual3D>
                            <ModelVisual3D >
                                <ModelVisual3D.Content>
                                    <GeometryModel3D x:Name="Panel1">
                                        <GeometryModel3D.Geometry >
                                            <MeshGeometry3D TriangleIndices="0,1,2 2,3,0" TextureCoordinates="0,1 1,1 1,0 0,0" Positions="-0.5,-0.5,0 0.5,-0.5,0 0.5,0.5,0 -0.5,0.5,0"/>

                                        </GeometryModel3D.Geometry>

                                        <GeometryModel3D.Material>
                                            <DiffuseMaterial >

                                                <DiffuseMaterial.Brush >
                                                      
                                                    <ImageBrush  x:Name="Panle1Img"   Stretch="UniformToFill">

                                                    </ImageBrush>

                                                </DiffuseMaterial.Brush>
                                            </DiffuseMaterial>
                                        </GeometryModel3D.Material>
                                        <GeometryModel3D.Transform>
                                            <Transform3DGroup>
                                                <RotateTransform3D  >
                                                    <RotateTransform3D.Rotation>
                                                        <AxisAngleRotation3D x:Name="Tran3DRotate1"  Axis="0,1,0" Angle="0" />
                                                    </RotateTransform3D.Rotation>  
                                                </RotateTransform3D>
                                                
                                                
                                            </Transform3DGroup>
                                        </GeometryModel3D.Transform>
                                    </GeometryModel3D>


                                </ModelVisual3D.Content>

                            </ModelVisual3D>
                            <Viewport2DVisual3D x:Name="Panle2" >
                                <Viewport2DVisual3D.Geometry >
                                    <MeshGeometry3D TriangleIndices="0,1,2 2,3,0" TextureCoordinates="0,1 1,1 1,0 0,0" Positions="-0.5,-0.5,0 0.5,-0.5,0 0.5,0.5,0 -0.5,0.5,0"/>
                                </Viewport2DVisual3D.Geometry>
                                <Viewport2DVisual3D.Material>
                                    <DiffuseMaterial >
                                        <DiffuseMaterial.Brush >
                                            
                                            <ImageBrush x:Name="Panle2Img"  Stretch="UniformToFill">

                                            </ImageBrush>

                                        </DiffuseMaterial.Brush>
                                    </DiffuseMaterial>
                                </Viewport2DVisual3D.Material>
                                <Viewport2DVisual3D.Transform>
                                    <RotateTransform3D  >
                                        <RotateTransform3D.Rotation>
                                            <AxisAngleRotation3D x:Name="Tran3DRotate2" Axis="0,1,0" Angle="0" />
                                        </RotateTransform3D.Rotation>
                                    </RotateTransform3D>
                                </Viewport2DVisual3D.Transform>
                            </Viewport2DVisual3D>  
                        </Viewport3D.Children>
                    </Viewport3D> 
                    
                </Grid> 

                <Label Uid="Lb_Name" x:Name="Lb_Name" Canvas.Top="133" Canvas.Left="0" Height="24" Width="100" 
                           Margin="0 -6" FlowDirection="LeftToRight" HorizontalContentAlignment="Center">火影忍者</Label>

            </Canvas>
        </Border>
    </Canvas>
</UserControl>
